#ifndef MAPLOADER_LAYER_HPP
#define MAPLOADER_LAYER_HPP

// std Header
#include <vector>
#include <sstream>

// pugi Header
#include "pugi.hpp"

// SL
#include "../SimpleRPG/System/Base.hpp"

namespace maploader
{
	class Layer
	{
	public:
		Layer();

	protected:
		std::string myName;
		float myOpacity;
		bool myVisible;

		enum Encoding
		{
			Base64,
			CSV,
			XML,
			ECount
		};		
		static std::string myEncodingFormat[Encoding::ECount];
		unsigned int myEncoding;

		enum Compression
		{
			gzip,
			zlib,
			none,
			CCount
		};
		static std::string myCompressionFormat[Compression::CCount];
		unsigned int myCompression;
		std::vector<std::vector<unsigned int> > myData;

	public:
		static Layer Load(const pugi::xml_node& node, unsigned int width, unsigned int height);
		std::vector<std::vector<unsigned int> > GetData();
		std::string GetName();
	};
}

#endif //MAPLOADER_LAYER_HPP